﻿<!DOCTYPE html>
<html>
<head>
    <!--[if lt IE 9]>
        <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <title>@ViewBag.Title</title>
    <meta name="viewport" content="width=device-width">

    <link href="~/Content/Style.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.22/jquery-ui.min.js"></script>
    <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js"></script>
    <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.validate.unobtrusive.min.js"></script>
    <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.unobtrusive-ajax.min.js"></script>
    <script type="text/javascript" src="~/Scripts/Shared/modernizr-2.5.3.js"></script>
    <script type="text/javascript" src="~/Scripts/Shared/Placeholders.min.js"></script>
    <script type="text/javascript" src="~/Scripts/Notification/jquery.noty.js"></script>
    <script type="text/javascript" src="~/Scripts/Notification/bottom.js"></script>
    <script type="text/javascript" src="~/Scripts/Notification/default.js"></script>
    <script type="text/javascript" src="~/Scripts/Shared/jquery.throttle.min.js"></script>
    <script type="text/javascript" src="~/Scripts/Shared/Olemas.js"></script>

    @if (IsSectionDefined("AddToHead"))
    {
        @RenderSection("AddToHead", required: false)
    }
</head>
<body>
    
    <section id="Page" class="Page">
        @*--Logo--*@
        <figure id="logo"></figure>
        @*--Header--*@
        <header>
            
            <a href="~/"></a>
            @*--Search Function--*@

            <div id="searchDiv" class="searchDiv" title="Siia võib kirjutada otsitava materjali nime või autori">

                <input id="searchBox" placeholder="Otsi.." />
                <a id="searchButton" href="~/Default.aspx">Otsi</a>
            </div>

        </header>
        @*--Navigation menu--*@
        <nav>
            <a id="homePage" href="@Url.Action("Index", "Home", new { id = (object) null })">Õpikud</a>
            <a id="conspectsPage" href="@Url.Action("Index", "Conspects", new {id = (object) null})">Konspektid</a>
            <a id="testsPage" href="@Url.Action("Index", "Tests", new {id = (object) null })">Tööd</a>
            <a id="infoPage" href="@Url.Action("Index", "Info")">Info</a>
            @*--Add Items--*@
            <a id="addPage" class="addItemButton" href="@Url.Action("Index", "Add")">Lisa enda kuulutus!</a>

        </nav>


        @*--Main content--*@
        <section id="MainContent">
            @RenderBody()
        </section>


        @*--Sidebar--*@
        <section id="Sidebar">
            @RenderSection("SideBar", false)
        </section>


        @*--Footer--*@
        <section id="footer">

            <script type="text/javascript">

                $(document).ready(function () {
                    // Placeholder support for browsers
                    Placeholders.init();
                   
                    // Mark current page as active in navigation menu.
                    if ($('#@ViewBag.CurrentPage').attr("id") == "addPage") {
                        $('#@ViewBag.CurrentPage').addClass('currentAdd');
                    } else {
                        $('#@ViewBag.CurrentPage').addClass("current");
                    }

                    $("#searchBox").autocomplete({
                        source: '@Url.Action("Find", "Autocomplete")',
                        minLength: 2,
                        delay: 250
                    });
                })

            </script>
            @if (IsSectionDefined("AddToFooter"))
            {
                @RenderSection("AddToFooter", required: false)
            }
        </section>

    </section>
</body>
</html>
